package com.atguigu.gmall.activity.client;

import com.atguigu.gmall.activity.client.impl.ActivityDegradeFeignClient;
import com.atguigu.gmall.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@FeignClient(value = "service-activity", fallback = ActivityDegradeFeignClient.class)
public interface ActivityFeignClient {

    /**
     * 查询Redis中当日秒杀商品列表
     *
     * @return
     */
    @GetMapping("/api/activity/inner/seckill/findAll")
    public Result getSeckillGoodsList();


    /**
     * 查询指定秒杀商品信息
     *
     * @param skuId
     * @return
     */
    @GetMapping("/api/activity/inner/seckill/getSeckillGoods/{skuId}")
    public Result getSeckillGoods(@PathVariable("skuId") Long skuId);


    /**
     * 获取当前登录用户秒杀订单确认页面相关数据
     *
     * @return
     */
    @GetMapping("/api/activity/inner/seckill/auth/trade")
    public Result<Map> getSeckillOrderTradeDatas();
}
